[ Mega Script Archive ] [ Frequently Asked Questions ]

What is #!/usr/bin/perl and do I need to modify it?

  • Short Answer:

    This line must be the first line in your perl program source. It tells the shell that is executing this script where the perl binary is to use to run this program.

    Long Answer:

    This line must be in your perl script as the first line to get it to run right. This often causes a 500 Server Error if this is not set as your first line or if it is set in the wrong place. To find out the location of your perl binary, type the following at your unix prompt:

         which perl

    and copy the info it returns as the first line of you program, with #! in front of the location of perl. If this command fails, ask your system administrator if you have perl installed on the system and where you should point this line to.


[ Mega Script Archive ]